<script>
// 组件加载器
export default {
    props: {
        componentInfo: Object
    },
    created() {
        // 动态注册组件
        this.$options.components[this.componentInfo.name] = () => import(`@/components${this.componentInfo.url}.vue`);
    },
    // 用render方法动态渲染组件
    render(h) {
        return h(this.componentInfo.name);
    },
}
</script>